Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/geode/basic/console_logger_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@

namespace geode
{
class opengeode_basic_api ConsoleLoggerClient : public LoggerClient

Check warning on line 32 in include/geode/basic/console_logger_client.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/console_logger_client.hpp:32:31 [cppcoreguidelines-special-member-functions]

class 'ConsoleLoggerClient' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator
{
public:
ConsoleLoggerClient();
~ConsoleLoggerClient();

Check warning on line 36 in include/geode/basic/console_logger_client.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/console_logger_client.hpp:36:9 [cppcoreguidelines-explicit-virtual-functions]

annotate this function with 'override' or (rarely) 'final'

private:
void trace( const std::string &message ) override;
Expand All @@ -42,7 +42,7 @@

void info( const std::string &message ) override;

void warn( const std::string &message ) override;
void warning( const std::string &message ) override;

void error( const std::string &message ) override;

Expand Down
2 changes: 1 addition & 1 deletion include/geode/basic/factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace geode
Creator( create_function_impl< DerivedClass > ) )
.second )
{
Logger::warn(
Logger::warning(
"Factory: Trying to register twice the same key" );
}
}
Expand Down
2 changes: 1 addition & 1 deletion include/geode/basic/file_logger_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace geode

void info( const std::string &message ) override;

void warn( const std::string &message ) override;
void warning( const std::string &message ) override;

void error( const std::string &message ) override;

Expand Down
2 changes: 1 addition & 1 deletion include/geode/basic/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
};

template < typename Object, typename... Args >
class Input : public IOFile

Check warning on line 64 in include/geode/basic/input.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/input.hpp:64:11 [cppcoreguidelines-special-member-functions]

class 'Input' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator
{
public:
using InputData = Object;
Expand All @@ -74,11 +74,11 @@

[[nodiscard]] virtual Object read( const Args&... args ) = 0;

~Input()

Check warning on line 77 in include/geode/basic/input.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/input.hpp:77:9 [cppcoreguidelines-explicit-virtual-functions]

annotate this function with 'override' or (rarely) 'final'
{
if( inspect_required_ )
{
geode::Logger::warn(
geode::Logger::warning(
"[Input] The file loader notified INCONSISTENCIES in the "
"given data file. In consequence, the loaded structure is "
"likely BROKEN, and there is NO GUARANTEE that any further "
Expand Down
8 changes: 4 additions & 4 deletions include/geode/basic/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
/*!
* Custom OpenGeode logger. Can be used with several levels:
* Logger::info( "My information is ", 42 );
* Logger::warn( "My warning is ", 42, " or more" );
* Logger::warning( "My warning is ", 42, " or more" );
*/
class opengeode_basic_api Logger

Check warning on line 41 in include/geode/basic/logger.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/logger.hpp:41:31 [cppcoreguidelines-special-member-functions]

class 'Logger' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator
{
public:
enum struct LEVEL : std::uint8_t
Expand All @@ -46,8 +46,8 @@
trace,
debug,
info,
warn,
err,
warning,
error,
critical,
off
};
Expand Down Expand Up @@ -81,7 +81,7 @@
}

template < typename... Args >
static void warn( const Args &...args )
static void warning( const Args &...args )
{
log_warn( absl::StrCat( args... ) );
}
Expand Down
2 changes: 1 addition & 1 deletion include/geode/basic/logger_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

namespace geode
{
class opengeode_basic_api LoggerClient

Check warning on line 30 in include/geode/basic/logger_client.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/logger_client.hpp:30:31 [cppcoreguidelines-special-member-functions]

class 'LoggerClient' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator
{
public:
virtual ~LoggerClient() = default;
Expand All @@ -38,7 +38,7 @@

virtual void info( const std::string &message ) = 0;

virtual void warn( const std::string &message ) = 0;
virtual void warning( const std::string &message ) = 0;

virtual void error( const std::string &message ) = 0;

Expand Down
2 changes: 1 addition & 1 deletion include/geode/basic/logger_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

namespace geode
{
class opengeode_basic_api LoggerManager

Check warning on line 36 in include/geode/basic/logger_manager.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/logger_manager.hpp:36:31 [cppcoreguidelines-special-member-functions]

class 'LoggerManager' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator
{
public:
~LoggerManager();
Expand All @@ -47,7 +47,7 @@

static void info( const std::string &message );

static void warn( const std::string &message );
static void warning( const std::string &message );

static void error( const std::string &message );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace geode
{
BRepBuilder builder{ brep };
const auto level = Logger::level();
Logger::set_level( Logger::LEVEL::warn );
Logger::set_level( Logger::LEVEL::warning );
async::parallel_invoke(
[&builder, &directory] {
builder.load_identifier( directory );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace geode
{
SectionBuilder builder{ section };
const auto level = Logger::level();
Logger::set_level( Logger::LEVEL::warn );
Logger::set_level( Logger::LEVEL::warning );
async::parallel_invoke(
[&builder, &directory] {
builder.load_identifier( directory );
Expand Down
6 changes: 3 additions & 3 deletions src/geode/basic/console_logger_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <geode/basic/console_logger_client.hpp>

// clang-format off
#include <spdlog/spdlog.h>

Check failure on line 27 in src/geode/basic/console_logger_client.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/basic/console_logger_client.cpp:27:10 [clang-diagnostic-error]

'spdlog/spdlog.h' file not found

#include <spdlog/sinks/stdout_color_sinks.h>
// clang-format on
Expand All @@ -37,7 +37,7 @@
class ConsoleLoggerClient::Impl
{
public:
Impl() : logger_impl_( spdlog::stdout_color_mt( "console" ) )

Check warning on line 40 in src/geode/basic/console_logger_client.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/basic/console_logger_client.cpp:40:9 [hicpp-use-equals-default]

use '= default' to define a trivial default constructor

Check warning on line 40 in src/geode/basic/console_logger_client.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/basic/console_logger_client.cpp:40:9 [cppcoreguidelines-pro-type-member-init]

constructor does not initialize these fields: logger_impl_
{
spdlog::set_level( spdlog::level::level_enum::trace );
}
Expand All @@ -57,7 +57,7 @@
logger_impl_->info( message );
}

void warn( const std::string &message )
void warning( const std::string &message )
{
logger_impl_->warn( message );
}
Expand Down Expand Up @@ -95,9 +95,9 @@
impl_->info( message );
}

void ConsoleLoggerClient::warn( const std::string &message )
void ConsoleLoggerClient::warning( const std::string &message )
{
impl_->warn( message );
impl_->warning( message );
}

void ConsoleLoggerClient::error( const std::string &message )
Expand Down
6 changes: 3 additions & 3 deletions src/geode/basic/file_logger_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <geode/basic/file_logger_client.hpp>

// clang-format off
#include <spdlog/spdlog.h>

Check failure on line 27 in src/geode/basic/file_logger_client.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/basic/file_logger_client.cpp:27:10 [clang-diagnostic-error]

'spdlog/spdlog.h' file not found

#include <spdlog/sinks/basic_file_sink.h>
// clang-format on
Expand Down Expand Up @@ -52,7 +52,7 @@
void set_file_path( std::string_view file_path )
{
static constexpr auto LOGGER_NAME = "geode_logger_file";
spdlog::drop( LOGGER_NAME );

Check warning on line 55 in src/geode/basic/file_logger_client.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/basic/file_logger_client.cpp:55:27 [readability-identifier-naming]

invalid case style for variable 'LOGGER_NAME'
logger_impl_ = spdlog::basic_logger_mt(
LOGGER_NAME, std::string( file_path ) );
if( always_flush_ )
Expand All @@ -76,7 +76,7 @@
logger_impl_->info( message );
}

void warn( const std::string &message )
void warning( const std::string &message )
{
logger_impl_->warn( message );
}
Expand Down Expand Up @@ -128,9 +128,9 @@
impl_->info( message );
}

void FileLoggerClient::warn( const std::string &message )
void FileLoggerClient::warning( const std::string &message )
{
impl_->warn( message );
impl_->warning( message );
}

void FileLoggerClient::error( const std::string &message )
Expand Down
10 changes: 5 additions & 5 deletions src/geode/basic/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ namespace geode

void log_warn( const std::string &message )
{
if( level_ <= LEVEL::warn )
if( level_ <= LEVEL::warning )
{
LoggerManager::warn( message );
LoggerManager::warning( message );
}
}

void log_error( const std::string &message )
{
if( level_ <= LEVEL::err )
if( level_ <= LEVEL::error )
{
LoggerManager::error( message );
}
Expand All @@ -103,8 +103,8 @@ namespace geode
{ geode::Logger::LEVEL::trace, geode::Logger::log_trace },
{ geode::Logger::LEVEL::debug, geode::Logger::log_debug },
{ geode::Logger::LEVEL::info, geode::Logger::log_info },
{ geode::Logger::LEVEL::warn, geode::Logger::log_warn },
{ geode::Logger::LEVEL::err, geode::Logger::log_error },
{ geode::Logger::LEVEL::warning, geode::Logger::log_warn },
{ geode::Logger::LEVEL::error, geode::Logger::log_error },
{ geode::Logger::LEVEL::critical, geode::Logger::log_critical }
};

Expand Down
8 changes: 4 additions & 4 deletions src/geode/basic/logger_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ namespace geode
}
}

void warn( const std::string &message )
void warning( const std::string &message )
{
for( auto &logger : loggers_ )
{
logger->warn( message );
logger->warning( message );
}
}

Expand Down Expand Up @@ -114,9 +114,9 @@ namespace geode
instance().impl_->info( message );
}

void LoggerManager::warn( const std::string &message )
void LoggerManager::warning( const std::string &message )
{
instance().impl_->warn( message );
instance().impl_->warning( message );
}

void LoggerManager::error( const std::string &message )
Expand Down
2 changes: 1 addition & 1 deletion src/geode/mesh/helpers/detail/surface_merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ namespace geode
}
catch( const OpenGeodeException& e )
{
Logger::warn( e.what() );
Logger::warning( e.what() );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/geode/model/helpers/aabb_model_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace
}
if( nb_non_empty_elements < nb_elements )
{
geode::Logger::warn( absl::StrCat( "[create_model_aabb] ",
geode::Logger::warning( absl::StrCat( "[create_model_aabb] ",
nb_elements - nb_non_empty_elements, " out of ", nb_elements,
" components have empty meshes, not included in the "
"AABBTree." ) );
Expand Down
2 changes: 1 addition & 1 deletion src/geode/model/helpers/component_mensurations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ namespace
}
if( grouped_sided_surfaces.size() > 1 )
{
geode::Logger::warn( block.component_id().string(),
geode::Logger::warning( block.component_id().string(),
" has unconnected boundaries. This block has either "
"topologically distinct parts or there are holes between the "
"block boundary surfaces." );
Expand Down
5 changes: 3 additions & 2 deletions src/geode/model/helpers/surface_radial_sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ namespace geode
{
if( edge_id == mesh.nb_edges() - 1 )
{
Logger::warn( "[surface_radial_sort] Degenerated polygons "
"has been found on all the edges of Line ",
Logger::warning(
"[surface_radial_sort] Degenerated polygons "
"has been found on all the edges of Line ",
line.id().string(),
". The result of surface_radial_sort is not "
"guaranteed." );
Expand Down
4 changes: 2 additions & 2 deletions src/geode/model/mixin/core/detail/relationships_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ namespace geode
if( const auto component_id =
relation_edge_index( from.id(), to.id() ) )
{
Logger::warn( "This relation already exists (", from.string(),
" and ", to.string(), ")" );
Logger::warning( "This relation already exists (",
from.string(), " and ", to.string(), ")" );
return component_id.value();
}
const auto index = GraphBuilder::create( *graph_ )->create_edge(
Expand Down
2 changes: 1 addition & 1 deletion src/geode/model/mixin/core/relationships.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace geode
{
const auto relation_type =
relation_type_->value( component_id.value() );
Logger::warn( "There is already a ",
Logger::warning( "There is already a ",
relation_to_string( relation_type ), " between (",
from.string(), " and ", to.string(), ")" );
return component_id.value();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace geode
const BRep& brep, std::string_view directory ) const
{
const auto level = Logger::level();
Logger::set_level( Logger::LEVEL::warn );
Logger::set_level( Logger::LEVEL::warning );
async::parallel_invoke(
[&directory, &brep] {
brep.save_identifier( directory );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace geode
const Section& section, std::string_view directory ) const
{
const auto level = Logger::level();
Logger::set_level( Logger::LEVEL::warn );
Logger::set_level( Logger::LEVEL::warning );
async::parallel_invoke(
[&directory, &section] {
section.save_identifier( directory );
Expand Down
6 changes: 3 additions & 3 deletions tests/basic/test-logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace
std::cout << "Old school logger => " << message << '\n';
}

void warn( const std::string &message ) override
void warning( const std::string &message ) override
{
std::cout << "Old school logger => " << message << '\n';
}
Expand All @@ -74,7 +74,7 @@ namespace
geode::Logger::trace( "test ", "trace" );
geode::Logger::debug( "test ", "debug" );
geode::Logger::info( "test ", "info" );
geode::Logger::warn( "test ", "warn" );
geode::Logger::warning( "test ", "warning" );
geode::Logger::error( "test ", "error" );
geode::Logger::critical( "test ", "critial" );
}
Expand Down Expand Up @@ -131,7 +131,7 @@ namespace
const auto &huge_msg = test_huge_message();
test_change_log_file( huge_msg );

geode::Logger::set_level( geode::Logger::LEVEL::err );
geode::Logger::set_level( geode::Logger::LEVEL::error );
test_logger();
}
} // namespace
Expand Down
Loading