!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.prefix=t(e)}(this,function(e){"use strict";var n,t,a={template:"[%t] %l:",levelFormatter:function(e){return e.toUpperCase()},nameFormatter:function(e){return e||"root"},timestampFormatter:function(e){return e.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},d={},r={reg:function(e){if(!e||!e.getLogger)throw new TypeError("Argument is not a root logger");n=e},apply:function(e,t){if(!e||!e.setLevel)throw new TypeError("Argument is not a logger");var r=e.methodFactory,s=e.name||"",o=d[s]||d[""]||a;return d[s]||(e.methodFactory=function(i,e,f){var p=r(i,e,f),m=d[f]||d[""],u=-1!==m.template.indexOf("%t"),c=-1!==m.template.indexOf("%l"),g=-1!==m.template.indexOf("%n");return function(){for(var e="",t=arguments.length,r=Array(t),o=0;o