API
Appsettings
Replace {DatabasePassword}
with your database password. The user needs read and write access to the database.
Replace {EncryptionKey}
with a 32 char key. The same key is required for all projects.
Replace {SecurityKey}
with a UUID.
Linux
appsettings.json
{
"Database": {
"ConnectionString": "Host=localhost;Database=broadcastsuite;Username=postgres;Password={DatabasePassword};"
},
"General": {
"EncryptionKey": "{EncryptionKey}",
"DefaultCulture": "de-CH"
},
"Settings": {
"LogPath": "/opt/slg/broadcastsuite/logs",
"UseColoredConsole": true
},
"Api": {
"BaseUrl": "http://127.0.0.1",
"Port": 8091,
"GrpcPort": 8092
},
"Jwt": {
"SecurityKey": "{SecurityKey}",
"Issuer": "http://localhost",
"Audience": "http://localhost",
"ExpiryInDays": 1
}
}
Windows
appsettings.json
{
"Database": {
"ConnectionString": "Host=localhost;Database=broadcastsuite;Username=postgres;Password={DatabasePassword};"
},
"General": {
"EncryptionKey": "{EncryptionKey}",
"DefaultCulture": "de-CH"
},
"Settings": {
"LogPath": "C:\\ProgramData\\SLG Broadcast Suite\\Logs\\",
"UseColoredConsole": true
},
"Api": {
"BaseUrl": "http://127.0.0.1",
"Port": 8091,
"GrpcPort": 8092
},
"Jwt": {
"SecurityKey": "{SecurityKey}",
"Issuer": "http://localhost",
"Audience": "http://localhost",
"ExpiryInDays": 1
}
}
Values
Database
Name | Type | Description |
---|---|---|
ConnectionString | String | The database connection. Contains Host , Database , Username and Password . |
General
Name | Type | Description |
---|---|---|
DefaultCulture | String | Represents the used culture |
Settings
Name | Type | Description |
---|---|---|
LogPath | String | The path in which folder the log files should be stored |
UseColoredConsole | Boolean | Indicates if a colored console should be used for logging |
API
Name | Type | Description |
---|---|---|
BaseUrl | String | The URL (without port) with which you connect to the API |
Port | UInt16 | The port with which you connect to the API |
GrpcPort | UInt16 | The gRPC port with which you connect to the API |
JWT
Name | Type | Description |
---|---|---|
Audience | String | The audience of the JWT token |
ExpiryInDays | Int32 | The amount of days how long the JWT token is valid |
Issuer | String | The issuer of the JWT token |
SecurityKey | String | The security key for the JWT signing credentials |
NLog
Linux
NLog.config
<?xml version="1.0" encoding="utf-8"?>
<!--suppress XmlUnusedNamespaceDeclaration || The "xmlns:xsi" line is important-->
<nlog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
autoReload="true"
internalLogLevel="Warn"
internalLogFile="/opt/slg/broadcastsuite/logs/NLog_API.txt">
<!-- <variable name="defaultLayout" -->
<!-- value="${date:format=yyyy-MM-dd HH\:mm\:ss} ${pad:padding=-5:fixedLength=True:inner=${uppercase:${level}}} ${pad:padding=-45:fixedLength=True:inner=${replace:searchFor=BroadcastSuite.:replaceWith=:inner=${logger}}:alignmentOnTruncation=right} ${message}" /> -->
<!-- <variable name="logPath" value="/opt/slg/broadcastsuite/logs/" /> -->
<!-- <variable name="fileDateSuffix" value="${date:format=yyyy-MM-dd}" /> -->
<!-- -->
<!-- <targets> -->
<!-- -->
<!-- <target name="DebugLog" xsi:type="File" fileName="${logPath}\DebugLogApi_${fileDateSuffix}.txt" layout="${defaultLayout}" /> -->
<!-- <target name="console" xsi:type="ColoredConsole" layout="${defaultLayout}" /> -->
<!-- -->
<!-- <target xsi:type="File" name="jsonFile" fileName="${logPath}\JsonLog_${fileDateSuffix}.json"> -->
<!-- -->
<!-- <layout>${defaultLayout}|${all-event-properties}</layout> -->
<!-- <layout xsi:type="JsonLayout" includeAllProperties="true"> -->
<!-- <attribute name="time" layout="${longdate}" /> -->
<!-- <attribute name="level" layout="${level:upperCase=true}" /> -->
<!-- <attribute name="message" layout="${message}" /> -->
<!-- </layout> -->
<!-- </target> -->
<!-- -->
<!-- </targets> -->
<!-- -->
<!-- <rules> -->
<!-- <logger name="*" minlevel="Trace" writeTo="DebugLog" /> -->
<!-- <logger name="*" minlevel="Trace" writeTo="console" /> -->
<!-- <logger name="*" minlevel="Trace" writeTo="jsonFile" /> -->
<!-- </rules> -->
</nlog>
Windows
NLog.config
<?xml version="1.0" encoding="utf-8"?>
<!--suppress XmlUnusedNamespaceDeclaration || The "xmlns:xsi" line is important-->
<nlog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
autoReload="true"
internalLogLevel="Warn"
internalLogFile="C:\ProgramData\SLG Broadcast Suite\Logs\NLog_API.txt">
<!-- <variable name="defaultLayout" -->
<!-- value="${date:format=yyyy-MM-dd HH\:mm\:ss} ${pad:padding=-5:fixedLength=True:inner=${uppercase:${level}}} ${pad:padding=-45:fixedLength=True:inner=${replace:searchFor=BroadcastSuite.:replaceWith=:inner=${logger}}:alignmentOnTruncation=right} ${message}" /> -->
<!-- <variable name="logPath" value="C:\ProgramData\SLG Broadcast Suite\Logs\" /> -->
<!-- <variable name="fileDateSuffix" value="${date:format=yyyy-MM-dd}" /> -->
<!-- -->
<!-- <targets> -->
<!-- -->
<!-- <target name="DebugLog" xsi:type="File" fileName="${logPath}\DebugLogApi_${fileDateSuffix}.txt" layout="${defaultLayout}" /> -->
<!-- <target name="console" xsi:type="ColoredConsole" layout="${defaultLayout}" /> -->
<!-- -->
<!-- <target xsi:type="File" name="jsonFile" fileName="${logPath}\JsonLog_${fileDateSuffix}.json"> -->
<!-- -->
<!-- <layout>${defaultLayout}|${all-event-properties}</layout> -->
<!-- <layout xsi:type="JsonLayout" includeAllProperties="true"> -->
<!-- <attribute name="time" layout="${longdate}" /> -->
<!-- <attribute name="level" layout="${level:upperCase=true}" /> -->
<!-- <attribute name="message" layout="${message}" /> -->
<!-- </layout> -->
<!-- </target> -->
<!-- -->
<!-- </targets> -->
<!-- -->
<!-- <rules> -->
<!-- <logger name="*" minlevel="Trace" writeTo="DebugLog" /> -->
<!-- <logger name="*" minlevel="Trace" writeTo="console" /> -->
<!-- <logger name="*" minlevel="Trace" writeTo="jsonFile" /> -->
<!-- </rules> -->
</nlog>