rusv / agafua-syslog Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/agafua-syslog
Automatically exported from code.google.com/p/agafua-syslog
Currently java.util.logging.SimpleFormatter is the only possible and hardcoded
choice for for formatter.
Original issue reported on code.google.com by [email protected]
on 24 Sep 2012 at 8:45
Currently logging level is not configurable
Original issue reported on code.google.com by [email protected]
on 24 Sep 2012 at 8:44
What steps will reproduce the problem?
1. I configured agafua syslog according to the documentation
https://code.google.com/p/agafua-syslog/w/list on both the rsyslog server and
the client logging.properties. It is logging successfully to a separate file
(configs attached)
2. Restart rsyslog and java
3. Tail the separate log file
4. All log messages will be on separate line for an exception:
Aug 5 17:03:53 rsyslog-server tomcat7: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
Aug 5 17:03:53 rsyslog-server tomcat7: at
java.lang.reflect.Method.invoke(Method.java:597)
What is the expected output? What do you see instead?
I expect a single stack trace to be on a single line.
What version of the product are you using? On what operating system?
tomcat7-jsp-2.2-api-7.0.39-1.jpp6.noarch
tomcat7-lib-7.0.39-1.jpp6.noarch
tomcat7-7.0.39-1.jpp6.noarch
tomcat7-admin-webapps-7.0.39-1.jpp6.noarch
tomcat7-servlet-3.0-api-7.0.39-1.jpp6.noarch
tomcat7-el-2.2-api-7.0.39-1.jpp6.noarch
[root@rsyslog-server lib]# cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m
Hint: root:changeme
Please provide any additional information below.
[root@rsyslog-server tomcat7]# cat conf/logging.properties
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
handlers = 1catalina.org.apache.juli.FileHandler,
2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler,
4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler,
com.agafua.syslog.SyslogHandler
.handlers = 1catalina.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.
2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.
3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.
4host-manager.org.apache.juli.FileHandler.level = FINE
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers =
2localhost.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handler
s = 3manager.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].le
vel = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].ha
ndlers = 4host-manager.org.apache.juli.FileHandler
# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
#org.apache.catalina.util.LifecycleBase.level = FINE
# To see debug messages in TldLocationsCache, uncomment the following line:
#org.apache.jasper.compiler.TldLocationsCache.level = FINE
# Console handler configuration
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
# Syslog logger
com.agafua.syslog.SyslogHandler.transport = udp
com.agafua.syslog.SyslogHandler.facility = local0
com.agafua.syslog.SyslogHandler.port = 514
com.agafua.syslog.SyslogHandler.hostname = localhost
[root@rsyslog-server tomcat7]# cat /etc/rsyslog.d/60-java.conf
$ModLoad imfile # needs to be done just once
$InputFileName /var/log/tomcat7/catalina.out
$InputFileTag tomcat7:
$InputFileStateFile /var/run/tomcat7.pid
$InputFileSeverity error
$InputFileFacility local0
$InputRunFileMonitor
$InputFilePollInterval 10
#$InputFileReadMode 2
$EscapeControlCharactersOnReceive off
$RepeatedMsgReduction on
$MaxMessageSize 32k
local0.* /var/log/agafubar.log
Original issue reported on code.google.com by [email protected]
on 6 Aug 2013 at 12:07
It is evident that primary usage of logger is for daemon services so logging
thread should not stop upon main thread termination, because in many cases main
thread just launches daughter server processes.
Original issue reported on code.google.com by [email protected]
on 24 Sep 2012 at 9:02
Very neat project! Good job!
Would it be possible for you guys to add a license so that we know whether it is something we can use?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.