rj-action-library/Runtime/Logging/RJLog.cs

42 lines
694 B
C#
Raw Normal View History

2024-05-05 07:52:06 +00:00
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System;
using System.Linq;
using Godot;
namespace Rokojori
{
public class RJLog
{
static void Stringify( object obj, StringBuilder output )
{
output.Append( obj.ToString() );
}
static void LogMessage( string message )
{
GD.Print( message );
}
public static void Log( params object[] objects)
{
var sb = new StringBuilder();
for ( int i = 0; i < objects.Length; i++ )
{
if ( i != 0 )
{
sb.Append( " " );
}
Stringify( objects[ i ], sb );
}
LogMessage( sb.ToString() );
}
}
}