fteCreateLogger (create an MFT file or database logger)
Use the fteCreateLogger command to create a Managed File Transfer file or database logger.
On AIX®, Linux®, and Windows systems, if you are
using the IBM® MQ server installation image, you must
satisfy both these conditions in order to run the command: - Be an IBM MQ administrator.
- Be a member of the mqm group (if the mqm group is defined on the system).
On z/OS® systems, you must satisfy at
least one of these conditions in order to run the command:- Be a member of the mqm group (if the mqm group is defined on the system).
- Be a member of the group named in the BFG_GROUP_NAME environment variable (if one is named).
- Have no value set in the BFG_GROUP_NAME environment variable when the command is run.
![[IBM i]](ngibmi.gif)
Loggers on IBM i
Managed File Transfer loggers are not supported on the IBM i platform.
Purpose
- SYSTEM.FTE.LOG.CMD.logger_name
- SYSTEM.FTE.LOG.RJCT.logger_name
These queues are internal system queues that you must not modify, delete, or read messages from unless you are deleting the logger. The MQSC commands to run are also supplied in a file in the following location: MQ_DATA_PATH\mqft\config\coordination_qmgr\loggers\logger_name\logger_name_create.mqsc
If you later want to delete the logger, use the fteDeleteLogger command.
Managed File Transfer provides advanced logger properties that help you configure loggers. See, MFT logger configuration properties
wmqfte.database.credentials, in the logger.properties file to
specify the path to the MQMFTCredentials.xml file. A sample of this credentials
file is located in
MQ_INSTALLATION_PATH/mqft/samples/credentials/.Special characters
Take care when you use parameter values that contain special characters so that you avoid the command shell interpreting the characters in a way you do not expect. For example, fully qualified file paths and names that contains such characters as space, quotation mark (single or double), forward-slash or back-slash characters, might be interpreted by the command shell rather than being passed through directly to the command itself. To avoid characters being interpreted by the command shell, enclose the entire parameter in double/single quotation marks or escape the special characters by using the escape sequence of the command shell.
Syntax
Parameters
- -loggerType type
- Required. Specifies where managed file transfer information will be logged. The options for type are either DATABASE, if transfer information will be logged to a database, or FILE, if the information will be logged to a file.
- -loggerQMgr qmgr_name
- Optional. Determines the queue manager to connect to in order to receive messages containing information about managed file transfers. The queue manager must be on the same system as the logger. If you do not specify the -loggerQMgr parameter then the coordination queue manager that is associated with the configuration options set for this logger is used as the default.
- -dbType database_type
- Required when -loggerType is DATABASE. Specifies the type of
database management system in use for storing managed file transfer information. The options are
db2 or oracleNote: You need to create tables by using SQL files. The .sql files are available from MQ_INSTALLATION_PATH_/mqft/sql:
- For Db2 databases: ftelog_tables_db2.sql
- For Oracle databases: ftelog_tables_oracle.sql
- -dbName database_name
- Required when -loggerType is DATABASE. The name of the database where managed file transfer information is stored. The database must be configured with the Managed File Transfer log tables.
- -dbDriver driver
- Required when -loggerType is DATABASE. The location of the JDBC driver classes for the database. This is typically the path and file name of a JAR file.
- -dbLib path
- Optional when -loggerType is DATABASE. The location of any native libraries needed by your chosen database driver.
- -fileLoggerMode mode
- Required when -loggerType is FILE. Specifies the type of file system in use for storing managed file transfer information. The options are LINEAR or CIRCULAR.
- -fileSize size
- Required when -loggerType is FILE. The maximum size that a log file is allowed to grow to. The value is a positive integer, greater than zero, followed by one of the following units: KB, MB, GB, m (minutes), h (hours), d (days), w (weeks). For example: -fileSize 5MB (specifies a maximum size of 5MB) , -fileSize 2d (specifies a maximum of 2 days worth of data).
- -fileCount number
- Required when -loggerType is FILE and -fileLoggerMode is CIRCULAR. The maximum number of log files to create. When the amount of data exceeds the maximum amount that can be stored in this number of files, the oldest file is deleted so that the number of log files never exceeds the value specified in this parameter.
- -loggerQMgrHost
- Host name, or IP address, of the machine where the logger queue manager is running.
- -loggerQMgrPort
- Port number where the logger queue manager is listening.
- -loggerQMgrChannel
- Name of the channel used for connecting to the logger queue manager.
-s service_name- Optional (Windows systems
only). Indicates that the logger is to run as a Windows
service. If you do not specify service_name, the service is named
mqmftLoggerLOGGERQMGR, where LOGGER is the logger name and QMGR is your logger queue manager name.
-su user_name- Optional (Windows only).
When the logger is to run as a Windows service, this
parameter specifies the name of the account under which the service runs. To run the logger using a
Windows domain user account specify the value in the
form
DomainName\UserName. To run the service using an account from the local built-in domain specify the value in the formUserName.
-sp password- Optional (Windows only). Password for the user account set by the -su parameter.
-sj options- Optional (Windows only). When the logger is started as a Windows service, defines a list of options in the form of -D or -X that are passed to the JVM. The options are separated using a number sign (#) or semicolon (;) character. If you must embed any (#) or semicolon (;) characters, put them inside single quotation marks.
-sl options- Optional (Windows only). Sets the Windows service log level. Valid options are: error, info, warn, debug. The default is info. This option can be useful if you are having problems with the Windows service. Setting it to debug gives more detailed information in the service log file.
- -p configuration_options
- Optional. Specifies the set of configuration options that is used to create the logger. By convention, this value is the name of a coordination queue manager. If you do not specify this parameter, the default set of configuration options is used.
- -f
- Optional. Forces the command to overwrite the existing configuration.
- logger_name
- Required. Name of the logger to create. This is incorporated into Managed File Transfer queue names, and so must contain only letters, numbers, and the periods (.) and underscore characters (_). It is also limited to a maximum length of 28 characters.
- -credentialsFile file_path
- Optional. The full file path of an existing or new credentials file, to which the IBM MQ authentication details are added.
- -userid username
- Optional. The user ID used to associate the credential details. If you do not specify a user ID, the credential details will apply to all users. You must also specify the -credentialsFile parameter.
- -? or -h
- Optional. Displays command syntax.
Examples
In this example, a circular file logger is created called filelogger1. The file logger will create a maximum of 10 files, each file being 10MB in size, using a maximum of 100MB of disk space in total:
fteCreateLogger -loggerType FILE -fileLoggerMode CIRCULAR -fileSize 10MB -fileCount 10 filelogger1
fteCreateLogger -loggerType DATABASE -dbName FTEDB -dbType DB2
-dbDriver "C:\Program Files (x86)\IBM\SQLLIB\java\db2jcc4.jar" dblogger1fteCreateLogger -loggerType DATABASE -dbName FTEDB -dbType oracle
-dbDriver "C:\app\oracle\product\12.1.0\dbhome_2\jdbc\lib\ojdbc7.jar" dblogger1fteCreateLogger -loggerType FILE -loggerQMgr CORDQM -loggerQMgrHost cordqm.ibm.com
-fileLoggerMode CIRCULAR -fileSize 10MB -fileCount 10 FL1 fteCreateLogger -loggerType FILE -loggerQMgr CORDQM -loggerQMgrHost cordqm.ibm.com
-loggerQMgrPort 4444 -loggerQMgrChannel LOGGER_CHANNEL -fileLoggerMode CIRCULAR -fileSize 10MB
-fileCount 10 FL1 Return codes
- 0
- Command completed successfully.
- 1
- Command ended unsuccessfully.
