mirror of
https://github.com/coder/code-server.git
synced 2024-11-28 05:03:35 +03:00
c6d35d098a
* Implement net.Server * Move Socket class into Client This way we don't need to expose anything. * Remove some unused imports * Pass environment variables to bootstrap fork * Add debug log for when socket disconnects from server * Use VSCODE_ALLOW_IO for shared process only * Extension host can send messages now * Support callback for logging This lets us do potentially expensive operations which will only be performed if the log level is sufficiently low. * Stop extension host from committing suicide * Blank line * Add static serve (#21) * Add extension URLs * how did i remove this * Fix writing an empty string * Implement dialogs on window service |
||
---|---|---|
.. | ||
src | ||
package.json | ||
README.md | ||
yarn.lock |
Logger
Beautiful client logging inspired by https://github.com/uber-go/zap.
Example Usage
import { field, logger } from "@coder/logger";
logger.info("Loading container",
field("container_id", container.id_str),
field("organization_id", organization.id_str));
Formatting
By default the logger uses a different formatter depending on whether it detects it is running in the browser or not. A custom formatter can be set:
import { logger, Formatter } from "@coder/logger";
class MyFormatter extends Formatter {
// implementation ...
}
logger.formatter = new MyFormatter();