first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
// Vendored wasm-logger.
|
||||
// MIT License: Copyright (c) 2018 Limira
|
||||
use crate::LogConfig;
|
||||
use anyhow::Result;
|
||||
use log::{Level, Log, Metadata, Record};
|
||||
use wasm_bindgen::prelude::*;
|
||||
use web_sys::console;
|
||||
|
||||
use crate::LogConfig;
|
||||
|
||||
/// Initializes the global logger for the application.
|
||||
/// Note: On WASM, `config` is ignored since we always log to the browser console.
|
||||
pub fn init(_config: LogConfig) -> Result<()> {
|
||||
@@ -188,7 +189,7 @@ impl Log for WasmLogger {
|
||||
fn flush(&self) {}
|
||||
}
|
||||
|
||||
/// Initialize the logger which the given config. If failed, it will log a message to the the browser console.
|
||||
/// Initialize the logger with the given config. If initialization fails, it will log a message to the browser console.
|
||||
fn init_logger(config: Config) {
|
||||
let max_level = config.level;
|
||||
let wl = WasmLogger {
|
||||
|
||||
Reference in New Issue
Block a user