WAM: unique logging API

Description

Right now, in WAM, we have several development log implementations:

  • PmLog (disabled in AGL as we don't have pmlog library)

  • fprintf

  • cerr

The goals of this task are:

  • Adding a PMLOG macros fallback implementation that is not depending on libpmlog, but just dumps to stderr with the channels enabled in an environment variable.

  • Rename the PMLOG macros to LOG.

Environment

None

Activity

José Dapena Paz 
September 9, 2020 at 3:14 PM

If there was a defer status, that's the one I would set. On next upgrade to Chromium we should get Chromium LOG support for all the PmLog calls. At that point only updating WAM (the WAM component) logging will be needed

Walt Miner 
September 2, 2020 at 3:35 PM

 Can this issue be closed?

José Dapena Paz 
November 16, 2018 at 3:06 PM

Ok, so it seems it is as simple as adding the level prefix to the line. It would be even trivial to add a fake implementation in case we don't want to add mandatory systemd headers dependency.

For simplicity, we can just forget about channels for now (not available in systemd logging either), and just add an stderr implementation using systemd macros.

P.S. not a magician... yet.

jose bollo 
November 16, 2018 at 11:30 AM

you are a magician that can answer my comment before I wrote it. Bien hecho!

jose bollo 
November 16, 2018 at 8:46 AM
(edited)

I point out below the specification of how to write daemon/programs compliant with systemd logging system.

https://www.systutorials.com/docs/linux/man/3-sd-daemon/

As you can read, outputting to STDERR is a good option. This is the option used by binders.

Won't Fix

Details

Assignee

Reporter

Labels

Contract ID

Components

Priority

Created November 15, 2018 at 5:20 PM
Updated December 18, 2020 at 4:00 PM
Resolved September 9, 2020 at 3:14 PM