agusmakmun / django-log-viewer

Django Log Viewer allows you to read & download log files in the admin page
https://pypi.org/project/django-log-viewer/
MIT License
74 stars 30 forks source link

LOG_VIEWER_FILES setting not working as intended #28

Open irfanhakim-as opened 2 years ago

irfanhakim-as commented 2 years ago
#LOG_VIEWER_FILES = ['info.log','debug.log','warning.log','error.log']
#LOG_VIEWER_FILES_PATTERN = '*.log*'
#LOG_VIEWER_FILES_DIR = '/my_app/logs/'

I have tried many combinations of this, even commenting all of these settings altogether, but somehow I will always end up with all five logs I have in the '/my_app/logs' directory (which includes stats.log) - despite wanting only four of the logs specified in LOG_VIEWER_FILES.

I'm confused as to how this is possible even when I give no information whatsoever (by commenting all of them) on where my log files are located or what pattern to use in finding these files. One thing to note however, if I set the wrong location to my logs to LOG_VIEWER_FILES_DIR, instead of commenting the variable entirely, django-log-viewer will indeed not find my log files.

I'm not sure what I am doing wrong here, and would appreciate any help I can get.

jacopsd commented 1 year ago

Probably due to this rule: LOG_VIEWER_FILES_PATTERN = '*.log*'

Try to remove it.