mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 10:29:06 +02:00
Formatted files
This commit is contained in:
@@ -132,8 +132,12 @@ class ArcaneLogger {
|
||||
metadata.putIfAbsent("timestamp", () => now);
|
||||
|
||||
try {
|
||||
final List<String> parts =
|
||||
StackTrace.current.toString().split("\n")[2].split(RegExp("#2"))[1].trimLeft().split(".");
|
||||
final List<String> parts = StackTrace.current
|
||||
.toString()
|
||||
.split("\n")[2]
|
||||
.split(RegExp("#2"))[1]
|
||||
.trimLeft()
|
||||
.split(".");
|
||||
|
||||
module ??= parts.first.replaceFirst("new ", "");
|
||||
method ??= parts[1].split(" ").first.replaceAll("<anonymous", "");
|
||||
@@ -147,10 +151,12 @@ class ArcaneLogger {
|
||||
.last
|
||||
.split(":");
|
||||
|
||||
final String fileAndLine = "${fileAndLineParts[0]}:${fileAndLineParts[1]}";
|
||||
final String fileAndLine =
|
||||
"${fileAndLineParts[0]}:${fileAndLineParts[1]}";
|
||||
|
||||
metadata.putIfAbsent("module", () => module!);
|
||||
if (method.isNotNullOrEmpty) metadata.putIfAbsent("method", () => method!);
|
||||
if (method.isNotNullOrEmpty)
|
||||
metadata.putIfAbsent("method", () => method!);
|
||||
metadata.putIfAbsent("filenameAndLineNumber", () => fileAndLine);
|
||||
} catch (_) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user