# LogEvent Class

Module
import { LogEvent } from "@tsed/logger"
Source/packages/logger/src/core/LogEvent.ts

# Overview

class LogEvent {
/**
 * Models a logging event.
 * @<span class="token keyword">constructor</span>
 * @param <span class="token punctuation">{</span>String<span class="token punctuation">}</span> _categoryName name of category
 * @param <span class="token punctuation">{</span><a href="/api/logger/core/LogLevel.html"><span class="token">LogLevel</span></a><span class="token punctuation">}</span> _level level of message
 * @param <span class="token punctuation">{</span>Array<span class="token punctuation">}</span> _data objects to log
 * @param _context
 */
<span class="token keyword">constructor</span><span class="token punctuation">(</span>_categoryName<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">,</span> _level<span class="token punctuation">:</span> <a href="/api/logger/core/LogLevel.html"><span class="token">LogLevel</span></a><span class="token punctuation">,</span> _data<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> _context<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

get <span class="token function">startTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">Date</span><span class="token punctuation">;</span>
get <span class="token function">categoryName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">;</span>
get <span class="token function">level</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <a href="/api/logger/core/LogLevel.html"><span class="token">LogLevel</span></a><span class="token punctuation">;</span>
get <span class="token function">formatedLevel</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">;</span>
get <span class="token function">data</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
get <span class="token function">context</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> Map&lt;<span class="token keyword">string</span><span class="token punctuation">,</span> <span class="token keyword">any</span>&gt;<span class="token punctuation">;</span>
get <span class="token function">cluster</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">;</span>
get <span class="token function">pid</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">;</span>

}

# Constructor

constructor(_categoryName: string, _level: LogLevel, _data: any[], _context: any);

Models a logging event.

# Members

get startTime(): Date;

get categoryName(): string;

get level(): LogLevel;

get formatedLevel(): string;

get data(): any[];

get context(): Map<string, any>;

get cluster(): any;

get pid(): any;

Other topics