#1708 Added "title" option.
This commit is contained in:
parent
33bfecd49b
commit
ea72052f50
15 changed files with 152 additions and 10 deletions
|
@ -6,8 +6,8 @@
|
|||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2019 Spudz76 <https://github.com/Spudz76>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -28,12 +28,13 @@
|
|||
|
||||
|
||||
#include "base/io/log/backends/ConsoleLog.h"
|
||||
#include "base/tools/Handle.h"
|
||||
#include "base/io/log/Log.h"
|
||||
#include "base/kernel/config/Title.h"
|
||||
#include "base/tools/Handle.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
xmrig::ConsoleLog::ConsoleLog()
|
||||
xmrig::ConsoleLog::ConsoleLog(const Title &title)
|
||||
{
|
||||
if (!isSupported()) {
|
||||
Log::setColors(false);
|
||||
|
@ -61,7 +62,9 @@ xmrig::ConsoleLog::ConsoleLog()
|
|||
}
|
||||
}
|
||||
|
||||
SetConsoleTitleA(APP_NAME " " APP_VERSION);
|
||||
if (title.isEnabled()) {
|
||||
SetConsoleTitleA(title.value());
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2019 Spudz76 <https://github.com/Spudz76>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -38,12 +38,15 @@ using uv_tty_t = struct uv_tty_s;
|
|||
namespace xmrig {
|
||||
|
||||
|
||||
class Title;
|
||||
|
||||
|
||||
class ConsoleLog : public ILogBackend
|
||||
{
|
||||
public:
|
||||
XMRIG_DISABLE_COPY_MOVE(ConsoleLog)
|
||||
|
||||
ConsoleLog();
|
||||
ConsoleLog(const Title &title);
|
||||
~ConsoleLog() override;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue