Enhancing Effect.logError to Match console.error Functionality

Is there a way to make Effect.log more comprehensive or to be more like console.error?
Look at the difference between doing Effect.logError(error) and just console.error

 {
  code: 'SQLITE_UNKNOWN',
  rawCode: undefined,
  [cause]: [ResponseError: SQLite error: no such table: tokens] {
    code: 'SQLITE_UNKNOWN',
    proto: {
      message: 'SQLite error: no such table: tokens',
      code: 'SQLITE_UNKNOWN'
    }
  }
}

And here is the Effect logError, as you can see, it is ommiting key aspects of the error like the fact that the table does not exists
timestamp=2024-08-11T06:57:48.867Z level=ERROR fiber=#739 message="Database error" message="{
  \"_tag\": \"DatabaseError\",
  \"cause\": {
    \"code\": \"SQLITE_UNKNOWN\",
    \"name\": \"LibsqlError\"
  }
}"
Was this page helpful?