Score:0

Openldap LogLevel : Log timestamp in milliseconds

mu flag

Does anyone know how to configure the Loglevel in Openldap to log milliseconds? The current loglevel 256 does log day and time (Jan 13 10:32:12). We have tried different levels none of them capable of logging in milliseconds.

user1686 avatar
fr flag
Is your slapd set up to send logs via syslog or directly to files?
Score:0
uy flag

There is no way to configure the time format in OpenLDAP because it only sends messages to syslog. It is your syslog server which, when writing the message to a file, adds the timestamp in the process.

Configuring your syslog server to log with millisecond precision requires knowing which one you are using.If you add this information to your question, we'll be able to provide more help.

Score:-1
cn flag

Why do you assume we know how to fix that more than the documentation?

https://www.openldap.org/doc/admin24/slapdconfig.html

has a list of all supported log levels. Here is a hint: The Log LEVEL has NO implication to the timestamp, it only determines WHAT is logged. This is why it is called "level". Not "format" or something. It is there to allow fast filtering of log events.

Going deeper, I did not find any documentation about changing the timestamp format. So, I asked BINK AE "In OpenLdap is there a way to configure the log files to show millisecond timestamps?" and it also told me: "I’m sorry, but I couldn’t find any information about configuring OpenLDAP log files to show millisecond timestamps", which matches my research.

So, your best bet would be to find the developer community and ask the developers - it may be a feature request. Quite funny actually - a second is a long time, millisecond timestamps are definitely useful at times.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.