![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2025
Location: Almeria, Spain
Device: Kindle, Ipad
|
Log format of server-access-log.txt
Hello
I would like to set up a log parser (Awstats) for the calibre server, but the format in which the dates and times appear in the logs is not compatible with any of the supported formats. Is there a way to change the output format of server-access-log.txt to suit Awstats (or any other log parser)? Thanks in advance! ================================== Buenos días Me gustaría montar un analizador de logs (Awstats) del servidor de calibre, pero el formato en el que aparecen las fechas y las horas en el logs no es compatible con ninguno de los formatos admitidos. ¿Hay alguna forma de cambiar el formato de salida de server-access-log.txt para adecuarlo a Awstats (o cualquier otro analizador de logs)? ¡Gracias por adelantado! |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,308
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not without editing the source code, it isnt. Line 546 of http_response.py
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2025
Location: Almeria, Spain
Device: Kindle, Ipad
|
Can you give me some indication so that the date format is one of these three (preferably the third one)?
Thanks in advance! |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,410
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
See https://docs.python.org/3/library/da...ptime-behavior for the format codes.
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2025
Location: Almeria, Spain
Device: Kindle, Ipad
|
¡Muchas gracias por todo!
Al final he seguido las instrucciones de https://manual.calibre-ebook.com/develop.html para montar un entorno de desarrollo de calibre (intenté compilar todo pero me estaba dando más de un quebradero de cabeza) y he modificado la línea 546 del fichero http_response.py con el siguiente contenido: Code:
ts = time.strftime('%d/%b/%Y:%H:%M:%S %z') Code:
LogFormat="%host %other %logname %time2 %methodurl %code %bytesd" Un saludo, Josema |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2025
Location: Almeria, Spain
Device: Kindle, Ipad
|
To make future updates easier, would there be any possibility that the calibre-server log format setting could be changed from the calibre GUI?
=================================== De cara a facilitar las actualizaciones, ¿habría alguna posibilidad de que la configuración del formato del log de calibre-server se pudiera cambiar desde el GUI de calibre? |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,308
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, not something I am interested in implementing, sorry.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difference between log.debug, log.info, log.warn log.error | lrpirlet | Development | 3 | 02-20-2021 03:43 AM |
Access log not updated | rbodewes | Server | 1 | 12-14-2019 12:24 PM |
Access Log | ZyloxDragon | Server | 3 | 10-10-2019 12:51 PM |
Content Server -- access log info | Ginnia | Library Management | 5 | 09-12-2017 06:07 AM |
calibre-server access log? | Geremia | Calibre | 5 | 06-29-2013 10:18 PM |