diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-04-16 13:46:37 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-04-16 18:14:01 +0200 |
commit | efaffaa9d1de38efecb718aa7a99ba1f2e342ade (patch) | |
tree | 6e0f4443ddd02c73069e43e0d8a79529eaa00023 /src/nix/ls.cc | |
parent | 67a5941472ab56a798556ee2d5afc62fc38a799a (diff) |
Use Logger::stdout()
(cherry picked from commit 8f41847394524fcac40d3b5620139ca7e94a18e3)
Diffstat (limited to 'src/nix/ls.cc')
-rw-r--r-- | src/nix/ls.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nix/ls.cc b/src/nix/ls.cc index 3ef1f2750..8590199d7 100644 --- a/src/nix/ls.cc +++ b/src/nix/ls.cc @@ -34,16 +34,14 @@ struct MixLs : virtual Args, MixJSON (st.isExecutable ? "-r-xr-xr-x" : "-r--r--r--") : st.type == FSAccessor::Type::tSymlink ? "lrwxrwxrwx" : "dr-xr-xr-x"; - std::cout << - (format("%s %20d %s") % tp % st.fileSize % relPath); + auto line = fmt("%s %20d %s", tp, st.fileSize, relPath); if (st.type == FSAccessor::Type::tSymlink) - std::cout << " -> " << accessor->readLink(curPath) - ; - std::cout << "\n"; + line += " -> " + accessor->readLink(curPath); + logger->stdout(line); if (recursive && st.type == FSAccessor::Type::tDirectory) doPath(st, curPath, relPath, false); } else { - std::cout << relPath << "\n"; + logger->stdout(relPath); if (recursive) { auto st = accessor->stat(curPath); if (st.type == FSAccessor::Type::tDirectory) |