View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005255 | GNUnet | General | public | 2018-01-16 16:54 | 2020-08-22 11:56 |
Reporter | Florian Dold | Assigned To | Florian Dold | ||
Priority | normal | Severity | feature | Reproducibility | have not tried |
Status | confirmed | Resolution | open | ||
Summary | 0005255: sort out logging | ||||
Description | Currently the GNUnet-based services (exchange and merchant backend) have their own logging file, while everything else goes into the arm log. All components should log properly into their own files. This *might* require changes to ARM. For non-GNUnet-based services, logs are typically written to stdout, and ARM must write these logs to the correct file (and handle rotation etc. just like for GNUnet services). Maybe ARM does not handle this correctly at the moment. | ||||
Tags | No tags attached. | ||||
|
Eh, you mean they log to 'stderr', not 'stdout'. Also, ARM does not handle rotation, and I don't think it should. I could see adding an option to ARM to map stderr to some process-specific log file, that would make sense. |
|
Oops yes, of course stderr. The goal is that all services (frontends, uwsgi, etc.) output things in the same format as GNUnet-based services: each in their own file with a date pattern. Maybe the easiest way is to write some "log wrapper" shell script that captures stderr and writes it to a file that is rotated (the same way that GNUNET_log does log rotation, based on the pattern in the log file name), and then wrap all these components in the ARM service definition? This avoids changes to ARM. |
|
That might be neat in general. If we do it in C instead of as a shell script, we might even drop that functionality from GNUNET_log and _always_ use the wrapper. (Shell scripts are bad for that, for both performance and portability reasons.) |
|
Agreed to writing it in C if we also use it in GNUnet. I just wanted a quick solution to make the taler.net logs less ugly! So this would mean that existing GNUnet binaries lose their -l option, and we'd have some utility (let's call it gnunet-log? gnunet-log-write?) that takes -l and respects GNUNET_FORCE_LOGFILE? So services would be invoked by ARM like gnunet-log-write $LOGWRITE_OPTIONS $PREFIX gnunet-service-consensus $OPTIONS ... where $LOGWRITE_OPTIONS is a new ARM config value, since we can't use OPTIONS to control the log file location anymore (we could change PREFIX but maybe that's a bit ugly). Another alternative would be that not gnunet-log-write starts the actual process, but that gnunet-log-write reads from stdin, and ARM just writes the stderr of the service to stdin of gnunet-log-write (but then it kinda has to manage two processes ...) But not matter if we actually do it in GNUnet, I guess we agree that this wrapper is the easiest solution for logging properly in Taler(-frontends). |
|
I think we shouldn't do this for 0.5, maybe 0.7, and do it right. |
|
Well I've already written and integrated taler-log-adapter [1], which is a rather simple python script that writes logs in their proper location. Once this log adapter is implemented in GNUnet, we can just switch to it, but now we finally have separate logs for the bank and various merchant frontends. [1] https://git.taler.net/deployment.git/tree/bin/taler-log-adapter |
|
Leaving this open until the log adapter is available in GNUnet ... |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-01-16 16:54 | Florian Dold | New Issue | |
2018-01-18 09:41 | Christian Grothoff | Note Added: 0012795 | |
2018-01-18 09:41 | Christian Grothoff | Severity | minor => feature |
2018-01-18 09:41 | Christian Grothoff | Status | new => confirmed |
2018-01-18 09:41 | Christian Grothoff | Product Version | => git (master) |
2018-01-18 11:12 | Florian Dold | Note Added: 0012797 | |
2018-01-18 11:12 | Florian Dold | Assigned To | => Florian Dold |
2018-01-18 11:12 | Florian Dold | Status | confirmed => feedback |
2018-01-18 11:12 | Florian Dold | Target Version | => 0.5 |
2018-01-18 11:15 | Christian Grothoff | Note Added: 0012798 | |
2018-01-18 11:50 | Florian Dold | Note Added: 0012799 | |
2018-01-18 12:00 | Christian Grothoff | Note Added: 0012800 | |
2018-01-18 12:00 | Christian Grothoff | Target Version | 0.5 => 0.7.1 |
2018-01-18 15:52 | Florian Dold | Note Added: 0012801 | |
2018-01-18 15:53 | Florian Dold | Status | feedback => confirmed |
2018-01-18 15:53 | Florian Dold | Note Added: 0012802 | |
2020-03-29 22:04 | Christian Grothoff | Target Version | 0.7.1 => 0.8.1 |
2020-08-22 11:56 | Christian Grothoff | Project | Taler => GNUnet |
2020-08-22 11:56 | Christian Grothoff | Category | deployment and operations => General |