Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  1. Fotoware Alto
    • 11.14 Schreckhorn
    • Terminology
    • Solutions
    • User Guide - Deutsch
    • User Guide - English
    • API Changelog
  2. Fotoware Veloz
    • Managing users and groups
    • Configuring archives
    • Configuring workflows
    • Configuring site behavior
    • Navigating and searching to find your assets
    • Working with your assets
    • Editing asset metadata
    • Uploading files
    • Version Control in Fotoware
    • Albums - Creating and sharing collections
    • Placing assets in a CMS
    • Working with the Fotoware Pro interface
    • Using the Fotoware plugins
    • Consent management
    • User guide to FotoWeb for iPad (Legacy)
    • Picture conferencing with FotoWeb Screens (Legacy)
    • What's what in Fotoware
    • GDPR
    • Fotoware Veloz releases
    • Activity Exports
    • Fotoware Example Workflows
  3. Fotostation
    • Getting started with Fotostation
    • Viewing, selecting and sorting files
    • Managing your assets with archives
    • Adding metadata to assets
    • Searching for assets
    • Working with your assets
    • Version Control in Fotostation
    • Automating tasks with Actions
    • Configuring metadata fields and editors
    • Configuring Fotostation
    • Configuring Fotostation for multi-user environments
    • Troubleshooting Fotostation
  4. Fotoware Flow
    • What is Flow?
    • Getting started
    • Flow dictionary
  5. Fotoware On-Premises
    • Getting started
    • Index Manager
    • FotoWeb
    • Color Factory
    • Connect
    • Operations Center Guide
  6. Integrations and APIs
    • The Fotoware API
    • Creating integrations using embeddable widgets
    • Authorizing applications using OAuth
    • Auto-tagging
    • FotoWeb Drag and Drop export
    • Integration using webhooks
    • Optimizely and Episerver plugin documentation
    • User Interface Integrations
  7. Fotoware Mobile
    • User guide for Fotoware Mobile for iPhone and Android
    • User guide to FotoWeb for iPad (Legacy)
    • User guide to FotoWeb for iPhone and Android (Legacy)

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support

Table of Contents

About the logs Preparing your database server Configuring the log server Apply these changes to the above tags Restart all Fotoware services
  • Home
  • Fotoware On-Premises
  • Operations Center Guide

Writing the event log to a database

This is a step-by-step guide on how to configure the Fotoware log service to write entries to a SQL database.

04. April 2025

Elaine Foley

Table of Contents

About the logs Preparing your database server Configuring the log server Apply these changes to the above tags Restart all Fotoware services

About the logs

By default, the log files are written to C:\ProgramData\Fotoware\Log Files
The current log file is called FWEvents.log. In the History folder at the same location as mentioned above you can find old log files. A new log file is created every day or when the log's file size exceeds 500 MB.

The log file is written in NLog format, so any NLog viever with log tailing functionality can be used to tail events that are written to the log. In some instances, however, it may make sense to write the Fotoware events to a database. The way to configure this is described below.

Preparing your database server

Before configuring the log server, you will need to prepare your database server. In this example we will use the default SQL that comes with FotoWeb.
To be able to set this up at all, you will need a database management tool. For example ‘Microsoft SQL Server Management Studio’ (you will need a full Microsoft SQL version to get this tool).

  1. Start by creating a new database. You can for instance call it FWLog.
  2. Next, create the necessary tables. To do so, write this query to the new database:

01

02

03

04

05

06

07

08

09

10

11

12

13

14

CREATE TABLE FWLog

 

(EventID INT IDENTITY(1,1) NOT NULL,

Application VARCHAR(50) NOT NULL,

EventCode VARCHAR(50) NOT NULL,

Date VARCHAR(50) NOT NULL,

Time VARCHAR(50) NOT NULL,

Message VARCHAR(Max) NOT NULL,

Computer VARCHAR(50) NOT NULL,

UserName VARCHAR(50) NOT NULL,

FileName VARCHAR(255) NOT NULL,

FilePath VARCHAR(255) NOT NULL,

FileObjectName VARCHAR(255) NOT NULL,

)

Make sure the name you specify on the first line is the name of the database you've created.
Next, it's time to set up the log server.

Configuring the log server

The configuration file for the log server is located at: C:\Program Files (x86)\Fotoware\Log Server 7.0
 The file is called nlog.config and basically is an XML file.
 
Open the nlog.config file in a text editor. Then, inside the <targets> node add the following (below the last <target> node):

01

02

03

04

05

06

07

08

09

10

11

12

13

14

15

16

17

18

19

20

21

22

23

<target name="database" xsi:type="Database">

<dbprovider>sqlserver</dbprovider>

<dbhost>JVBTEST\FOTOWARE</dbhost>

<dbdatabase>FWLog</dbdatabase>

<dbusername>sa</dbusername>

<dbpassword>GgCP6127</dbpassword>

<commandText>

 

insert into FWLog(application,eventcode,date,time,message,computer,username,filename,filepath,fileobjectname) values (@application,@eventcode,@date,@time,@message,@computer,@username,@filename,@filepath,@fileobjectname);

</commandText>

<parameter name="@application" layout="${event-context:item=Application}" />

<parameter name="@eventcode" layout="${event-context:item=EventCode}" />

<parameter name="@date" layout="${shortdate}" />

<parameter name="@time" layout="${date:format=HH}:${date:format=mm}:${date:format=ss}:${date:format=fff}" />

<parameter name="@message" layout="${message}" />

<parameter name="@computer" layout="${event-context:item=Computer}" />

<parameter name="@userName" layout="${event-context:item=UserName}" />

<parameter name="@filename" layout="${event-context:item=FileName}" />

<parameter name="@filepath" layout="${event-context:item=Path}" />

</target>

Apply these changes to the above tags

In the <dbhost> tag, you will need to enter the name of your SQL server.

In the <dbdatabase> tag, write the name of the database you created earlier.

<dbusername> and <dbpassword> should contain your ‘sa’-user's username and password.

 Then inside the <rules> tag, add the following:

<logger name="*" minlevel="Trace" appendTo="database"/>

Restart all Fotoware services

Now, restart all Fotoware services (including the Operations Center and the Fotoware log server), and the events will be logged to the database.

Tip: To easily stop all Fotoware services on a server, simply stop the Fotoware Log Service. Since all the other services depend on this service, they will all be stopped gracefully.

logging database event storage

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Application registration using OAuth 2.0
  • Authorizing a client using OAuth 2.0
  • Using application access tokens for OAuth 2.0 authorization
eco-lighthouse-miljøfyrtårn

Company

  • About us
  • Resellers
  • Careers
  • Contact us

Help & support

  • Support center
  • Consultancy
  • Tech partners
  • Fotostation
  • System status

Trust Center

  • Legal
  • Security
  • Sustainability & ESG

Locations

Fotoware AS (HQ)
Tollbugata 35
0157 OSLO
Norway
FotoWare Switzerland AG
Industriestrasse 25
5033 Buchs (AG)
Switzerland

Copyright 2025 Fotoware All rights reserved.

  • Terms of service
  • Privacy policy
  • Cookie policy

Knowledge Base Software powered by Helpjuice

Expand