Updated example 1 to use PrimaryLogger

This commit is contained in:
Dev 2024-05-29 10:03:05 +01:00
parent bac95b3617
commit e5bd3c162a

View File

@ -11,12 +11,12 @@ class Mod implements IPreSptLoadMod
public preSptLoad(container: DependencyContainer): void
{
// get the logger from the server container
const logger = container.resolve<ILogger>("WinstonLogger");
const logger = container.resolve<ILogger>("PrimaryLogger");
logger.info("I am logging info!");
logger.warning("I am logging a warning!");
logger.error("I am logging an error!");
logger.logWithColor("I am logging with color!", LogTextColor.YELLOW, LogBackgroundColor.RED);
logger.logWithColor("I am logging with yellow text and a red background!", LogTextColor.YELLOW, LogBackgroundColor.RED);
}
}