[PATCH 1/2] log: new --log-func-loc option to enable function location in logs
Thomas Haller
thaller at redhat.com
Thu May 18 11:51:08 UTC 2017
On Thu, 2017-05-18 at 12:43 +0200, Aleksander Morgado wrote:
> The --debug output is a bit annoying right now because it includes
> the
> function location information by default. This information is most of
> the times not very useful, so just make it optional under a new
> command line argument for the daemon.
Hi,
For NetworkManager you cannot configure the bits that are logged. The
reasoning is, that a user reporting a bug usually wouldn't tweak the
logging format. Imagine you have to ask the reporter for enabling debug
level, turn on time-stamping, file-location, etc.
Also, one gets accustomed to the logging formats. If the user enables
--log-func-loc, then the log file looks unfamiliar.
The format is not configurable, but optimized to what is considered
best.
-- btw, for NM we also got rid of the file location. Instead logging
lines shall have a topic prefix, like:
<info> [1495107798.9054] manager: startup complete
^ ^ ^ ^
LEVEL timestamp topic message
Also, each logging message should be unique, so that you can find the
exact location in the source. So, if you know the source, you don't
need file:loc because you can grep for message.
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170518/9b3c0b33/attachment.sig>
More information about the ModemManager-devel
mailing list