ZUGFeRD API: Improve logging, Improve Messages
This commit is contained in:
parent
e21dff197f
commit
a3de8d3812
@ -100,6 +100,14 @@ namespace ZUGFeRDRESTService.Controllers
|
||||
|
||||
oResult = _props.CheckPropertyValues(oDocument, _propertyMap, "MESSAGEID");
|
||||
|
||||
var oRequiredProperties = _propertyMap.
|
||||
Where(prop => {return prop.Value.IsRequired == true;}).
|
||||
Select(prop => { return prop.Value.Description; })
|
||||
.ToList();
|
||||
|
||||
_logger.Debug("Found [{0}] required properties", oRequiredProperties.Count);
|
||||
_logger.Debug(String.Join(",", oRequiredProperties.ToArray()));
|
||||
|
||||
_logger.Debug("Result of checking against the database: {0} valid properties, {1} missing properties",
|
||||
oResult.ValidProperties.Count, oResult.MissingProperties.Count);
|
||||
|
||||
@ -130,7 +138,7 @@ namespace ZUGFeRDRESTService.Controllers
|
||||
ErrorType.NoValidFile => "Die hochgeladene Datei ist keine gültige Datei.",
|
||||
ErrorType.NoZugferd => "Die hochgeladene Datei ist keine ZUGFeRD-Rechnung.",
|
||||
ErrorType.NoValidZugferd => "Die hochgeladene Datei ist keine gültige ZUGFeRD-Rechnung.",
|
||||
ErrorType.MissingProperties => "Die hochgeladene Datei ist eine gültige ZUGFeRD-Rechnung, jedoch fehlen einige Metadaten",
|
||||
ErrorType.MissingProperties => "Die hochgeladene Datei ist keine gültige ZUGFeRD-Rechnung, es fehlen einige Metadaten",
|
||||
_ => "Die hochgeladene Datei kann nicht validiert werden.",
|
||||
};
|
||||
|
||||
|
||||
@ -23,11 +23,15 @@ namespace ZUGFeRDRESTService
|
||||
public Database(ILogging Logging, IConfiguration Config)
|
||||
{
|
||||
var LogConfig = Logging.LogConfig;
|
||||
var Logger = Logging.LogConfig.GetLogger();
|
||||
var AppConfig = Config.GetSection("Config");
|
||||
var FBConfig = AppConfig.GetSection("Firebird");
|
||||
|
||||
MSSQL = new MSSQLServer(LogConfig, AppConfig["MSSQLConnectionString"]);
|
||||
Firebird = new Firebird(LogConfig, FBConfig["Datasource"], FBConfig["Database"], FBConfig["Username"], FBConfig["Password"]);
|
||||
|
||||
Logger.Debug("MSSQL Connection: [{0}]", MSSQL.CurrentSQLConnectionString);
|
||||
Logger.Debug("Firebird Connection: [{0}]", Firebird.ConnectionString);
|
||||
}
|
||||
|
||||
public string GetGDPictureKey()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user