@joystick.js/node-canary 0.0.0-canary.350 → 0.0.0-canary.351

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.
@@ -25,29 +25,23 @@ const captureLog = (callback = null) => {
25
25
  var logs_default = async () => {
26
26
  const mongodb = await connectMongoDB();
27
27
  return captureLog(async (source = "", data = "") => {
28
- console.log({
29
- source,
30
- data
31
- });
32
28
  switch (source) {
33
29
  case "stdout":
34
- await mongodb.collection("logs").insertOne({
30
+ return mongodb.collection("logs").insertOne({
35
31
  error: false,
36
32
  timestamp: timestamps.get_current_time(),
37
33
  process_id: process.pid,
38
34
  data
39
35
  });
40
- return true;
41
36
  case "stderr":
42
37
  case "uncaughtException":
43
38
  case "unhandledRejection":
44
- await mongodb.collection("logs").insertOne({
39
+ return mongodb.collection("logs").insertOne({
45
40
  error: true,
46
41
  timestamp: timestamps.get_current_time(),
47
42
  process_id: process.pid,
48
43
  data
49
44
  });
50
- return true;
51
45
  default:
52
46
  return true;
53
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/node-canary",
3
- "version": "0.0.0-canary.350",
3
+ "version": "0.0.0-canary.351",
4
4
  "type": "module",
5
5
  "description": "A Node.js framework for building web apps.",
6
6
  "main": "./dist/index.js",