Coder Social home page Coder Social logo

agafua-syslog's People

Contributors

googlecodeexporter avatar rusv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

agafua-syslog's Issues

exception gets logged on seprate lines

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

Revert default mode of operation to daemon

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

license

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.