File tree 2 files changed +11
-2
lines changed 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { defineConfig } from "@trigger.dev/sdk/v3" ;
2
+ import { logger } from "../../packages/core/dist/commonjs/v3/logger-api.js" ;
2
3
3
4
export default defineConfig ( {
4
5
runtime : "bun" ,
@@ -18,7 +19,11 @@ export default defineConfig({
18
19
enableConsoleLogging : false ,
19
20
logLevel : "info" ,
20
21
onStart : async ( payload , { ctx } ) => {
21
- console . log ( `Task ${ ctx . task . id } started ${ ctx . run . id } ` ) ;
22
+ try {
23
+ console . log ( `Task ${ ctx . task . id } started ${ ctx . run . id } ` ) ;
24
+ } catch ( error ) {
25
+ console . log ( error )
26
+ }
22
27
} ,
23
28
onFailure : async ( payload , error , { ctx } ) => {
24
29
console . log ( `Task ${ ctx . task . id } failed ${ ctx . run . id } ` ) ;
Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ export default defineConfig({
31
31
enableConsoleLogging : false ,
32
32
logLevel : "info" ,
33
33
onStart : async ( payload , { ctx } ) => {
34
- console . log ( `Task ${ ctx . task . id } started ${ ctx . run . id } ` ) ;
34
+ try {
35
+ console . log ( `Task ${ ctx . task . id } started ${ ctx . run . id } ` ) ;
36
+ } catch ( error ) {
37
+ console . log ( error )
38
+ }
35
39
} ,
36
40
onFailure : async ( payload , error , { ctx } ) => {
37
41
console . log (
You can’t perform that action at this time.
0 commit comments