Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogcatAppender show errors for logs' "highlighting". #332

Open
3 tasks done
LSmyrnaios opened this issue Mar 28, 2023 · 0 comments
Open
3 tasks done

LogcatAppender show errors for logs' "highlighting". #332

LSmyrnaios opened this issue Mar 28, 2023 · 0 comments
Assignees

Comments

@LSmyrnaios
Copy link

LSmyrnaios commented Mar 28, 2023

Describe the bug

Hi,

I have set the LogcatAppender as such:

<appender name="Logcat" class="ch.qos.logback.classic.android.LogcatAppender">
        <encoder>
            <charset>UTF-8</charset>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{36}.%M\(@%line\)) - %msg%n</pattern>
        </encoder>
    </appender>

Wehn running the app, I get the following errors:

I/System.out: 13:58:11,249 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@a052b99 - There is no conversion class registered for composite conversion word [highlight]
I/System.out: 13:58:11,249 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@a052b99 - Failed to create converter for [%highlight] keyword
I/System.out: 13:58:11,249 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@a052b99 - There is no conversion class registered for composite conversion word [cyan]
I/System.out: 13:58:11,249 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@a052b99 - Failed to create converter for [%cyan] keyword

When using the "ConsoleAppender", in non-android projects, with the aforementioned pattern, the logs get highlighted.

Could you please add support for logs-highlighting?

Thank you

Reproduction

Set the above pattern inside the LogcatAppender, run the app and check the Logcat output for errors.

Logs

I/System.out: 13:58:11,249 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@a052b99 - There is no conversion class registered for composite conversion word [highlight]
I/System.out: 13:58:11,249 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@a052b99 - Failed to create converter for [%highlight] keyword
I/System.out: 13:58:11,249 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@a052b99 - There is no conversion class registered for composite conversion word [cyan]
I/System.out: 13:58:11,249 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@a052b99 - Failed to create converter for [%cyan] keyword

logback-android version

3.0.0

OS Version

Windows 10

What logback configuration are you using? (logback.xml or Java/Kotlin code)

logback.xml

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants