MCPcopy Index your code
hub / github.com/datalust/seq-logging / sayHello

Function sayHello

example/example.js:11–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9const interval = setInterval(sayHello, 100);
10
11function sayHello() {
12 n = n + 1;
13 console.log('Round ', n);
14
15 seq.emit({
16 timestamp: new Date(),
17 level: 'Information',
18 messageTemplate: 'Hello for the {n}th time, {user}!',
19 properties: {
20 user: process.env.USERNAME,
21 n: n
22 }
23 });
24
25 if (n === 25) {
26 seq.flush();
27 }
28
29 if (n === 100) {
30 clearInterval(interval);
31 seq.close();
32 }
33}

Callers

nothing calls this directly

Calls 3

emitMethod · 0.80
flushMethod · 0.80
closeMethod · 0.80

Tested by

no test coverage detected