Skip to content
New issue

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

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

Already on GitHub? # to your account

newline #30

Closed
zszep opened this issue Feb 24, 2022 · 6 comments
Closed

newline #30

zszep opened this issue Feb 24, 2022 · 6 comments

Comments

@zszep
Copy link

zszep commented Feb 24, 2022

There's no newline when viewing the logs. Everything is one big line.

@agusmakmun
Copy link
Owner

agusmakmun commented Aug 26, 2022

Hello @zszep for reporting this issue, seems like happen because of "Not Found" exclude.
meanwhile, I modify that exclude to the settings, but by default is None;

LOG_VIEWER_EXCLUDE_TEXT_PATTERN = None  # String regex expression to exclude the log from line

can you please upgrade your package which following this command:

pip install django-log-viewer --upgrade

Please tell us what happen after doing upgrade, is it resolved the issue or not.

cc @tulgaab, @ananasn, @Radialmed, @ashok-rai, @jamol1741

@ashok-rai
Copy link

No, It has not changed the log entries in the new iterable row as displayed in the documentation.
@agusmakmun, Is there any extra setup that we are missing to make the log entries in new lines as shown in the image

@agusmakmun
Copy link
Owner

@ashok-rai can you show me the screenshot of your logs? or you can paste the plain of logs here, so I can identify.

@ashok-rai
Copy link

@agusmakmun,

This is my log file
Screen Shot 2022-08-29 at 11 51 51 AM

And, this is the log_viewer UI which doesnot show the log entries with each new lines in the log file

Screen Shot 2022-08-29 at 11 51 44 AM

@agusmakmun
Copy link
Owner

ok thanks @ashok-rai, seems your logs not using double [ and ] to present the log format:
https://github.com/agusmakmun/django-log-viewer/blob/master/log_viewer_demo/log_viewer_demo/logger.py#L17

"[%(levelname)s] %(asctime)s %(name)s: %(message)s"

/|\           /|\

to remember that we have pattern in settings as well:

LOG_VIEWER_PATTERNS = ['[INFO]', '[DEBUG]', '[WARNING]', '[ERROR]', '[CRITICAL]']

so, you need to make sure both setup are corrects.

@ashok-rai
Copy link

Thank you @agusmakmun, this solves the issues.Now, it is working as expected.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants