mirror of
https://github.com/certd/certd.git
synced 2026-04-05 07:20:56 +08:00
Clean up eslintrc, style refactor and formatting fixes Update auto.js see https://github.com/publishlab/node-acme-client/issues/88#issuecomment-2105255828
29 lines
341 B
JavaScript
29 lines
341 B
JavaScript
/**
|
|
* ACME logger
|
|
*/
|
|
|
|
const debug = require('debug')('acme-client');
|
|
|
|
let logger = () => {};
|
|
|
|
/**
|
|
* Set logger function
|
|
*
|
|
* @param {function} fn Logger function
|
|
*/
|
|
|
|
exports.setLogger = (fn) => {
|
|
logger = fn;
|
|
};
|
|
|
|
/**
|
|
* Log message
|
|
*
|
|
* @param {string} msg Message
|
|
*/
|
|
|
|
exports.log = (msg) => {
|
|
debug(msg);
|
|
logger(msg);
|
|
};
|