aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/log-store.cc
diff options
context:
space:
mode:
authorThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2023-01-13 11:05:19 +0100
committerThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2023-01-13 11:05:44 +0100
commitb8a0e9a9b8f0499502d317b7424f6b59fd8b48fe (patch)
tree5dccce31297479c6eaa5086d2127d8c92c9f5a26 /src/libstore/log-store.cc
parentbdeb6de889219cb9d1ba94b4adc75b0d8000e1b2 (diff)
Move the `getBuildLog` implementation to its own implementation file
Keep the header minimal and clean
Diffstat (limited to 'src/libstore/log-store.cc')
-rw-r--r--src/libstore/log-store.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstore/log-store.cc b/src/libstore/log-store.cc
new file mode 100644
index 000000000..8a26832ab
--- /dev/null
+++ b/src/libstore/log-store.cc
@@ -0,0 +1,12 @@
+#include "log-store.hh"
+
+namespace nix {
+
+std::optional<std::string> LogStore::getBuildLog(const StorePath & path) {
+ auto maybePath = getBuildDerivationPath(path);
+ if (!maybePath)
+ return std::nullopt;
+ return getBuildLogExact(maybePath.value());
+}
+
+}