@koreanpanda/inscriber
Version:
A Logger that can write logs, and print them, with full customization.
68 lines (67 loc) • 2.58 kB
TypeScript
/**========================================================================
* ? ABOUT
* @author : Cody Spratford
* @email : koreanpanda345@gmail.com
* @repo : https://github.com/koreanpanda345/Inscriber
* @createdOn : 11/21/2020
* @description : This is a builder for custom loggers.
* @since : 11/21/2020
*========================================================================**/
import { CustomLogConfig } from "../global";
/**========================================================================
* Custom Log Builder
* @summary Builds the Custom Log Configuration for you.
* @example
*
* ```js
* const config = new CustomLogBuilder()
* .setName("Panda")
* .setAliases(["bamboo"])
* .setColor({text: "green"})
* .build();
* ```
*
*========================================================================**/
export declare class CustomLogBuilder {
private _config;
constructor();
/**==============================================
*
* @param name - The name you would like the log to be called.
*
*=============================================**/
setName(name: string): CustomLogBuilder;
/**==============================================
*
* @param aliases - The aliases to be used for this log.
*
*=============================================**/
setAliases(aliases?: string[]): CustomLogBuilder;
/**==============================================
*
* @param path - The path that the logs should be written to.
*
*=============================================**/
setPath(path?: string): CustomLogBuilder;
/**==============================================
*
* @param pattern - The pattern that the log should use when writing logs.
*
*=============================================**/
setPattern(pattern?: string): CustomLogBuilder;
/**==============================================
*
* @param color - what colors should the log use when priting the log out.
*
*=============================================**/
setColor(color?: {
text: string;
background: string;
}): CustomLogBuilder;
/**==============================================
*
* Builds the Custom Log Config.
*
*=============================================**/
build(): CustomLogConfig;
}