~aleteoryx/muditaos

ref: cb93d58d85fc9bc0e136ff7fb6fc58e092837159 muditaos/module-services/service-desktop/endpoints/developerMode/Mode/LogHelper.hpp -rw-r--r-- 864 bytes
cb93d58d — Adam Dobrowolski [CP-371] Updater miscelanous developer mode and logs changes 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <endpoints/Context.hpp>
#include <Service/Common.hpp>
#include <endpoints/BaseHelper.hpp>

namespace parserFSM
{

    class LogHelper : public BaseHelper
    {

      public:
        explicit LogHelper(const std::string &name, sys::Service *p) : BaseHelper(name, p)
        {}

        auto processPost(Context &context) -> ProcessResult final;
        auto processGet(Context &context) -> ProcessResult final;

      private:
        [[nodiscard]] auto setLogLevel(const std::string &, double) -> ProcessResult;
        [[nodiscard]] auto setLogDevice(const std::string &dev) -> ProcessResult;
        [[nodiscard]] auto getLogLevel(const std::string &) -> ProcessResult;
    };
} // namespace parserFSM