Skip to content

Commit

Permalink
Merge pull request #53 from purview-dev/removing-logging-when-types-n…
Browse files Browse the repository at this point in the history
…ot-available

v2.0 Release
  • Loading branch information
kieronlanning authored Feb 1, 2025
2 parents bb46887 + 07e1d3c commit b6579b1
Show file tree
Hide file tree
Showing 1,808 changed files with 16,517 additions and 4,106 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 KJL Solutions Ltd.
Copyright (c) 2025 KJL Solutions Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
39 changes: 33 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,53 @@
include .build/common.mk

# Variables
ROOT_FOLDER = src/
ROOT_FOLDER = ./src/
SOLUTION_FILE = $(ROOT_FOLDER)Purview.Telemetry.SourceGenerator.sln
TEST_PROJECT = $(ROOT_FOLDER)Purview.Telemetry.SourceGenerator.sln
CONFIGURATION = Release

PACK_VERSION = 1.1.0
PACK_VERSION = 2.0.0
ARTIFACT_FOLDER = p:/sync-projects/.local-nuget/

# Common variables
COLOUR_RESET = \033[0m

COLOUR_BLACK = \033[30m
COLOUR_RED = \033[31m
COLOUR_GREEN = \033[32m
COLOUR_ORANGE = \033[33m
COLOUR_BLUE = \033[34m
COLOUR_PURPLE = \033[35m
COLOUR_CYAN = \033[36m
COLOUR_WHITE = \033[37m

COLOUR_GREY = \033[90m

# Targets
build: ## Builds the project.
dotnet build $(SOLUTION_FILE) --configuration $(CONFIGURATION)
@echo -e "Building $(COLOUR_BLUE)$(SOLUTION_FILE)$(COLOUR_RESET) with $(COLOUR_ORANGE)$(CONFIGURATION)$(COLOUR_RESET)..."
@dotnet build $(SOLUTION_FILE) --configuration $(CONFIGURATION)

test: ## Runs the tests for the project.
dotnet test $(TEST_PROJECT) --configuration $(CONFIGURATION)
@echo -e "Running tests for $(COLOUR_BLUE)$(TEST_PROJECT)$(COLOUR_RESET) with $(COLOUR_ORANGE)$(CONFIGURATION)$(COLOUR_RESET)..."
@dotnet test $(TEST_PROJECT) --configuration $(CONFIGURATION)

pack: ## Packs the project into a nuget package using PACK_VERSION argument.
dotnet pack -c $(CONFIGURATION) -o $(ARTIFACT_FOLDER) $(ROOT_FOLDER)Purview.Telemetry.SourceGenerator/Purview.Telemetry.SourceGenerator.csproj --property:Version=$(PACK_VERSION) --include-symbols
@echo -e "Packing $(COLOUR_BLUE)Source Generator$(COLOUR_RESET) with $(COLOUR_ORANGE)$(PACK_VERSION)$(COLOUR_RESET)..."
@dotnet pack -c $(CONFIGURATION) -o $(ARTIFACT_FOLDER) $(ROOT_FOLDER)Purview.Telemetry.SourceGenerator/Purview.Telemetry.SourceGenerator.csproj --property:Version=$(PACK_VERSION) --include-symbols

format: ## Formats the code according to the rules of the src/.editorconfig file.
dotnet format $(ROOT_FOLDER)
@echo -e "Formatting $(COLOUR_BLUE)$(SOLUTION_FILE)$(COLOUR_RESET)..."
@dotnet format $(ROOT_FOLDER)

act:
@echo -e "Running $(COLOUR_BLUE)act$(COLOUR_RESET)..."
act -P ubuntu-latest=-self-hosted

vs: ## Opens the project in Visual Studio.
@echo -e "Opening $(COLOUR_BLUE)$(SOLUTION_FILE)$(COLOUR_RESET) in $(COLOUR_ORANGE)Visual Studio$(COLOUR_RESET)..."
@start $(SOLUTION_FILE)

code: ## Opens the project in Visual Studio Code.
@echo -e "Opening $(COLOUR_BLUE)Visual Studio Code$(COLOUR_RESET)..."
@code .
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ The latest version is available on [NuGet](https://www.nuget.org/packages/Purvie

* .NET Framework 4.7.2
* .NET Framework 4.8
* .NET 7
* .NET 8
* .NET 9

Expand Down Expand Up @@ -35,11 +34,17 @@ interface IEntityStoreTelemetry
void RetrievedEntity(Activity? activity, float totalValue, int lastUpdatedByUserId);

/// <summary>
/// Generates a structured log message using an ILogger.
/// Generates a structured log message using an ILogger - defaults to Informational.
/// </summary>
[Log]
void ProcessingEntity(int entityId, string updateState);

/// <summary>
/// Generates a structured log message using an ILogger, specifically defined as Informational.
/// </summary>
[Info]
void ProcessingAnotherEntity(int entityId, string updateState);

/// <summary>
/// Adds 1 to a Counter<T> with the entityId as a Tag.
/// </summary>
Expand Down
640 changes: 640 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion commitlint.config.ts

This file was deleted.

Loading

0 comments on commit b6579b1

Please sign in to comment.