chore: logging++

This commit is contained in:
cha0s 2022-04-04 04:41:15 -05:00
parent f17c450ccb
commit 4e7f27bf70

View File

@ -1,5 +1,4 @@
import {Flecks, Hooks} from '@flecks/core';
import D from 'debug';
import {D, Flecks, Hooks} from '@flecks/core';
import ActionRegistry from './action-registry';
import InputPacket from './packets/input';
@ -8,6 +7,7 @@ import TraitInteractive from './packets/trait-interactive';
export {ActionRegistry, InputPacket};
const debug = D('@avocado/input');
const debugSilly = debug.extend('silly');
export default {
[Hooks]: {
@ -18,7 +18,7 @@ export default {
'@flecks/core.starting': (flecks) => {
const {actions} = flecks.get('@avocado/input');
const ids = Object.fromEntries(actions.map((action, i) => [action, i]));
debug('action id map: %O', ids);
debugSilly('action id map: %O', ids);
InputPacket.setActionIds(ids);
},
'@flecks/socket.packets': () => ({