# LayoutReplacer Class private

Module
import { LayoutReplacer } from "@tsed/logger/src/layouts/class/LayoutReplacer"
Source/packages/logger/src/layouts/class/LayoutReplacer.ts

# Overview

class LayoutReplacer {
<span class="token keyword">constructor</span><span class="token punctuation">(</span>tokens<span class="token punctuation">:</span> <a href="/api/logger/layouts/interfaces/TokensHandlers.html"><span class="token">TokensHandlers</span></a><span class="token punctuation">,</span> timezoneOffset<span class="token punctuation">:</span> <span class="token keyword">number</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @param specifier
 * @returns <span class="token punctuation">{</span><span class="token keyword">any</span><span class="token punctuation">}</span>
 */
categoryName<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">,</span> specifier<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @param specifier
 * @returns <span class="token punctuation">{</span><span class="token keyword">any</span><span class="token punctuation">}</span>
 */
formatAsDate<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">,</span> specifier<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @returns <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span>
 */
hostname<span class="token punctuation">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @returns <span class="token punctuation">{</span><span class="token keyword">any</span><span class="token punctuation">}</span>
 */
formatMessage<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @returns <span class="token punctuation">{</span><span class="token keyword">string</span>|<span class="token keyword">string</span><span class="token punctuation">}</span>
 */
endOfLine<span class="token punctuation">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @returns <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span>
 */
logLevel<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @returns <span class="token punctuation">{</span><span class="token keyword">any</span><span class="token punctuation">}</span>
 */
startTime<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @returns <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span>
 */
startColour<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @returns <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span>
 */
endColour<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @returns <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span>
 */
percent<span class="token punctuation">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @returns <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span>
 */
pid<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent?<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a> | undefined<span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @param specifier
 * @returns <span class="token punctuation">{</span><span class="token keyword">any</span><span class="token punctuation">}</span>
 */
clusterInfo<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">,</span> specifier<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">)</span> =&gt; <span class="token keyword">string</span><span class="token punctuation">;</span>
/**
 *
 * @param loggingEvent
 * @param specifier
 * @returns <span class="token punctuation">{</span><span class="token keyword">any</span><span class="token punctuation">}</span>
 */
userDefined<span class="token punctuation">:</span> <span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">,</span> specifier<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">)</span> =&gt; <span class="token keyword">any</span><span class="token punctuation">;</span>
<span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <a href="/api/logger/layouts/interfaces/IReplacers.html"><span class="token">IReplacers</span></a><span class="token punctuation">;</span>

}

# Members

categoryName: (loggingEvent: LogEvent, specifier: string) => string;

formatAsDate: (loggingEvent: LogEvent, specifier: string) => string;

hostname: () => string;

formatMessage: (loggingEvent: LogEvent) => string;

endOfLine: () => string;

logLevel: (loggingEvent: LogEvent) => string;

startTime: (loggingEvent: LogEvent) => string;

startColour: (loggingEvent: LogEvent) => string;

endColour: (loggingEvent: LogEvent) => string;

percent: () => string;

pid: (loggingEvent?: LogEvent | undefined) => string;

clusterInfo: (loggingEvent: LogEvent, specifier: string) => string;

userDefined: (loggingEvent: LogEvent, specifier: string) => any;

build(): IReplacers;

Other topics