文档

API说明

  • error日志的函数原型为:

    /**
    * error日志
    * @param module module名称
    * @param tag tag名称
    * @param content 日志内容
    */
    export declare function error(module: string, tag: string, content: string): void;
  • warn日志的函数原型为:

    /**
    * warn日志
    * @param module module名称
    * @param tag tag名称
    * @param content 日志内容
    */
    export declare function warn(module: string, tag: string, content: string): void;
  • debug日志的函数原型为:

    /**
     * debug日志
    * @param module module名称
    * @param tag tag名称
    * @param content 日志内容
    */
    export declare function debug(module: string, tag: string, content: string): void;
  • info日志的函数原型为:

    /**
     * info日志
     * @param module module名称
     * @param tag tag名称
     * @param content 日志内容
     */
    export declare function info(module: string, tag: string, content: string): void;

示例代码:

import * as EmasLog from '@emas/emas-react-native-tlog';
//或者用下面这种形式,也可以只导入某个具体的方法
import {error, warn, debug, info} from  '@emas/emas-react-native-tlog';

EmasLog.error('TLog', 'Emas', 'Emas-->info log');
EmasLog.info('TLog', 'Emas', 'Emas-->info log');
EmasLog.warn('TLog', 'Emas', 'Emas-->warn log');
EmasLog.debug('TLog', 'Emas', 'Emas-->debug log');
  • 本页导读 (0)
文档反馈