@akc42/server-utils 4.0.9 → 4.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/debug-utils.js CHANGED
@@ -103,7 +103,7 @@ export function DebugHelper(topic, colourspec, shortdate, immediate, writer) {
103
103
 
104
104
  const fromDate = new Date(); //logtime is only possible if later than midnight last night.
105
105
  const from = fromDate.setHours(0,0,0,0)
106
- if (!(Number.isInteger(logtime) && logtime > from.getTime())) {
106
+ if (!(Number.isInteger(logtime) && logtime > from)) {
107
107
  if (ip !== undefined) {
108
108
  if (Array.isArray(ip)) args = ip.concat(args); else args.unshift(ip);
109
109
  }
package/debug.js CHANGED
@@ -141,7 +141,7 @@ export function logWriter(logtime, crash, shortdate,ipaddress, topic, message, c
141
141
 
142
142
  function logWrapper(logtime, crash, shortdate,ipaddress, topic, message, colourspec,gap, i) {
143
143
  const output = logWriter(logtime, crash, shortdate, ipaddress, topic, message, colourspec, gap);
144
- if (i) console.log(output.message);
144
+ if (i === 1) console.log(output.message);
145
145
  return output;
146
146
  }
147
147
 
@@ -230,7 +230,6 @@ export function Logger(topic, colourspec) {
230
230
  return function(c, ip, ...args) {
231
231
  const crash = (c === 'crash');
232
232
  const output = debug(c,ip,args);
233
- console.log(output.message);
234
233
  if (crash) {
235
234
  let lt;
236
235
  getDebugLog(async(logid,message) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akc42/server-utils",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
4
4
  "type": "module",
5
5
  "description": "A Set of Utilities to use on the Server Side of a Project",
6
6
  "main": "./server-utils.js",