Skip to content

Commit

Permalink
CBL-1565 Ensure c4log_enableFatalExceptionBacktrace is called
Browse files Browse the repository at this point in the history
CBL-1565 Ensure c4log_enableFatalExceptionBacktrace is called
  • Loading branch information
Sandy committed Apr 30, 2021
1 parent 8fce65c commit 548ae9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Couchbase.Lite.Shared/API/Database/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ private bool IsReadyToClose

static Database()
{
Native.c4log_enableFatalExceptionBacktrace();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public sealed partial class ReplicatorConfiguration
private C4SocketFactory _socketFactory;
private IConflictResolver _resolver;

#endregion
#endregion

#region Properties

Expand Down
5 changes: 4 additions & 1 deletion src/LiteCore/src/LiteCore.Shared/Interop/C4Base_native.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// C4Base_native.cs
//
// Copyright (c) 2020 Couchbase, Inc All rights reserved.
// Copyright (c) 2021 Couchbase, Inc All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -128,6 +128,9 @@ public static string c4log_getDomainName(C4LogDomain* x)
[DllImport(Constants.DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern void c4log_setLevel(C4LogDomain* c4Domain, C4LogLevel level);

[DllImport(Constants.DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern void c4log_enableFatalExceptionBacktrace();

public static void c4slog(C4LogDomain* domain, C4LogLevel level, string msg)
{
using(var msg_ = new C4String(msg)) {
Expand Down

0 comments on commit 548ae9f

Please sign in to comment.