UNPKG

@rbxts/rlog

Version:

Context-based server-side logging solution for ROBLOX projects.

49 lines 1.73 kB
/** * @license * Copyright 2024 Daymon Littrell-Reyes * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { LogEntry } from "../common"; import { LogContext } from "./log-context"; /** @internal */ export declare namespace LogContextManager { /** * Save a message to be sent later if the context is flagged. */ function save(message: LogEntry, context: LogContext): void; /** * Save a message to be sent later, regardless if the context is flagged. */ function push(message: LogEntry, context: LogContext): void; /** * Mark a context as "flagged", meaning a warning message was sent through it. * * So whenever the context is closed all pending messages should be sent. */ function flag(message: LogEntry): void; /** * Send all the pending messages for a context. * * To be called when the context is stopped. */ function flush(context: LogContext | string): void; function clear(): void; /** * Flag all current contexts, and flush them. * * Intended to be called before a game closes to avoid losing logs. */ function forceFlush(): void; } //# sourceMappingURL=log-context-manager.d.ts.map