Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Line number #42

Closed
astrekalova opened this issue Mar 6, 2015 · 3 comments
Closed

Line number #42

astrekalova opened this issue Mar 6, 2015 · 3 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@astrekalova
Copy link

Hello,
I'd like to use logstash-gelf library to log with the gelf appender to a logstash agent. I am using logback library and I could not find the possibilty to include line numbers in gelf log messages. Is it possible and how can I configure it? Here is my GelfLogAppender configuration:

<appender name="GELF" class="biz.paluch.logging.gelf.logback.GelfLogbackAppender">
        <host>udp:localhost</host>
        <port>12201</port>
        <version>1.0</version>
        <extractStackTrace>true</extractStackTrace>
        <filterStackTrace>false</filterStackTrace>
        <mdcProfiling>true</mdcProfiling>
        <timestampPattern>yyyy-MM-dd HH:mm:ss,SSSS</timestampPattern>
        <includeFullMdc>true</includeFullMdc>
        <line>true</line>
    </appender>
@mp911de
Copy link
Owner

mp911de commented Mar 6, 2015

Hi @astrekalova
this impl does not support it yet. SourceClassName and SourceMethodName are already provided. You can look up all the fields at http://logging.paluch.biz/default-fields.html

If you want to, you could send me over a PR for a new field like SourceLineNumber. All logging frameworks except java.util.logging can provide the line number.

@mp911de mp911de added the type: enhancement A general enhancement label Mar 6, 2015
@mp911de mp911de added this to the logstash-gelf 1.7.0 milestone Mar 6, 2015
mp911de added a commit that referenced this issue Mar 11, 2015
@mp911de
Copy link
Owner

mp911de commented Mar 11, 2015

Added support for SourceLineNumber in log4j, log4j2, logback JBoss logging. Available in 1.7.0-SNAPSHOT, see https://oss.sonatype.org/content/repositories/snapshots/biz/paluch/logging/logstash-gelf/1.7.0-SNAPSHOT/

@mp911de mp911de self-assigned this Mar 11, 2015
@mp911de
Copy link
Owner

mp911de commented Apr 22, 2015

Closing this issue, changes implemented.

@mp911de mp911de closed this as completed Apr 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants