Whenever a complaint shall be made before the city judges, to commence an action in behalf of the city against any person for the violation of any of the ordinances thereof, and such complaint shall be verified by the oath or affirmation of any person that the same is true, and that such violations has been committed of his own knowledge, and stating the facts and circumstances, such city judge may, if in his judgment the case requires it, issue a warrant at the commencement of such action, directed to the chief of police, commanding him to take the body of such person and bring him before such city judge to answer the complaint of said city in an action for the violation of such ordinance. Upon the return of such warrant the city judge may proceed forthwith to the trial of such action, and such person may be retained in custody, subject to the Criminal Procedure Law, until judgment be rendered in said action.
Actions brought to recover any penalty or forfeiture incurred under this act, or the ordinances or local laws made in pursuance of it, shall be brought in the name of the city; and in case of the recovery of judgment against any defendant, execution may be issued thereon immediately on the rendition of judgment. Any such action may be brought on the written direction of the mayor or resolution of the common council or by the corporation counsel without such direction or resolution. All expenses incurred in prosecution for the recovery of any penalty or forfeiture shall be defrayed by the city; and all penalties and forfeitures, when collected, shall be paid to the commissioner of finance for the use of said city.
Any judgment rendered in any such action may be removed by appeal by either party except that when such appeal is made by the city, no bond shall be required to be executed by or on behalf of the city. Whether such appeal on behalf of the city shall be taken shall be discretionary with the corporation counsel.