Agrarsense
SimulatorLog.h
Go to the documentation of this file.
1// Copyright (c) 2024 FrostBit Software Lab at the Lapland University of Applied Sciences
2//
3// This work is licensed under the terms of the MIT license.
4// For a copy, see <https://opensource.org/licenses/MIT>.
5
6#pragma once
7
8#include "CoreMinimal.h"
9#include "UObject/Object.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11
12#include "SimulatorLog.generated.h"
13
14class ULogFile;
15
20{
21
22public:
23
30 static void Log(const FString& Message, bool LogToTextFile = true, bool LogToROS = true);
31
32private:
33
35
39 static void Create();
40
44 static void Shutdown();
45
46 UPROPERTY()
48};
49
53UCLASS()
54class AGRARSENSE_API USimulatorLogFunctionLibrary : public UBlueprintFunctionLibrary
55{
56 GENERATED_BODY()
57
58public:
59
66 UFUNCTION(BlueprintCallable, Category = "Logging")
67 static void SimulatorLog(const FString& Message, bool LogToTextFile = true, bool LogToROS = true)
68 {
69 SimulatorLog::Log(Message, LogToTextFile, LogToROS);
70 }
71};
static void Log(const FString &Message, bool LogToTextFile=true, bool LogToROS=true)
static void Shutdown()
static void Create()
static ULogFile * SimulatorLogFile
Definition: SimulatorLog.h:47