nteventlog(3)

πŸ“¦
version 29.0.6 Β· 2 versions
, in nixos 26.05, nixpkgs unstable, ubuntu stonking

πŸ’– nteventlog πŸ’–

okay bestie, so this one is literally the manual page for nteventlog, section 3 of the manuals β€” your girl is about to make Windows event logs make sense, fr fr πŸͺŸβœ¨


🌸 NAME 🌸

nteventlog β€” the Interface to Windows Event Log, and yes she ate πŸ’…


🌈 DESCRIPTION 🌈

okay so nteventlog is a generic interface to the Windows event log. It is part of the OS_Mon application, see os_mon. 🫢

This module is the Windows backend for os_sup, okay? See os_sup. Iconic duo, no cap. πŸ‘‘

To retain backwards compatibility, this module can also be used to start a standalone nteventlog process that is not part of the OS_Mon supervision tree. When you start a process like this, you (yes you, the user 🫡) have to supply an identifier as well as a callback function to handle the messages.

The identifier is an arbitrary string, and the vibe check here is: reuse it whenever the same application (or node) wants to start the process. nteventlog gets informed about all events that have arrived to the eventlog since the last accepted message for the current identifier. As long as you use the same identifier, the same eventlog record will not be sent to nteventlog more than once β€” with the exception of when grave system failures arise, in which case the last records written before the failure may be sent to Erlang again after reboot. (yeah, that part lowkey hurts 😭)

If the event log is configured to wrap around automatically, records that arrived to the log and got overwritten while nteventlog was not running are lost. πŸ’€ But good news: it detects this state and loses no records that are not overwritten. Queen behavior, honestly. πŸŽ€

The callback function works as described in os_sup.

✨ See Also ✨

  • os_mon
  • os_sup
  • Windows NT documentation

πŸ”₯ FUNCTIONS πŸ”₯

πŸ’œ start/2 πŸ’œ

start(Identifier, MFA) -> Result
               when
                   Identifier :: string() | atom(),
                   MFA :: {Mod, Func, Args},
                   Mod :: atom(),
                   Func :: atom(),
                   Args :: [term()],
                   Result :: {ok, Pid} | {error, {already_started, Pid}},
                   Pid :: pid().

Equivalent to start_link(Identifier, MFA) except that no link is created between nteventlog and the calling process. so it's giving independent queen energy, no strings attached πŸ’…βœ¨

start_link(Identifier, MFA) -> Result
                    when
                        Identifier :: string() | atom(),
                        MFA :: {Mod, Func, Args},
                        Mod :: atom(),
                        Func :: atom(),
                        Args :: [term()],
                        Result ::
                            {ok, Pid} | {error, {already_started, Pid}},
                        Pid :: pid().

This function starts the standalone nteventlog process and, if start_link/2 is used, links to it. πŸ”— bestie is attached, literally.

Identifier is an identifier as described above. πŸ‘†

MFA is the supplied callback function. When nteventlog receives information about a new event, this function will be called as apply(Mod, Func, [Event|Args]) where Event is a tuple

heads up: the original page just… stops there mid-sentence at "where Event is a tuple". that's the whole sentence, don't come for me, I'm just the messenger πŸ™ˆ

πŸ’œ stop/0 πŸ’œ

stop() -> stopped.

Stops nteventlog. Usually only used during development. πŸ› οΈ The server does not have to be shut down gracefully to maintain its state β€” so like, you can just dip, she'll be fine. πŸ‘‹βœ¨


that's the whole page bestie, you're so welcome πŸ«ΆπŸŒΈπŸ¦‹

β€” brought to you by Ericsson AB, version os_mon 2.12, manual page nteventlog(3) ✨ that's the whole footer glow-up, periodt πŸ’…πŸ‘‘

πŸ“¦ where this page comes from